Socket
Socket
Sign inDemoInstall

mdast-util-to-string

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-to-string

mdast utility to get the plain text content of a node


Version published
Weekly downloads
9.9M
decreased by-20.28%
Maintainers
2
Weekly downloads
 
Created

What is mdast-util-to-string?

The mdast-util-to-string package is a utility to extract plain text strings from an MDAST (Markdown Abstract Syntax Tree) node. It is commonly used when working with markdown processing or AST manipulation to get the string representation of a node without any markdown syntax.

What are mdast-util-to-string's main functionalities?

Extracting string from MDAST node

This feature allows you to pass an MDAST node to the `toString` function and receive a plain text string in return. It's useful for extracting readable text from markdown content.

const toString = require('mdast-util-to-string');
const mdast = {
  type: 'paragraph',
  children: [{type: 'text', value: 'Hello, world!'}]
};

const text = toString(mdast);
console.log(text); // 'Hello, world!'

Other packages similar to mdast-util-to-string

Keywords

FAQs

Package last updated on 03 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc